fix(docs): move pages out of pages/ to restore original guide URLs#814
Merged
Conversation
The mystmd conversion nested every page under `pages/`, which added a
`pages/` segment to all guide URLs (e.g.
`/development/guides/mypy/` became `/development/pages/guides/mypy/`),
breaking existing links into the development guide.
Move the page tree back up one level so the URLs match the pre-mystmd
paths and old links work again:
- `git mv docs/pages/{guides,tutorials,principles,patterns,index.md}` to
`docs/`
- strip `pages/` from the toc in myst.yml and from internal
cross-reference links
- adjust the real `{include}` directives for `_partials/pyproject.md`
(one less directory level)
- update `docs/pages/` path references in noxfile.py and
.pre-commit-config.yaml
Assisted-by: ClaudeCode:claude-opus-4.8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
What
The mystmd conversion (#792) nested every page under
docs/pages/, which added apages/segment to all guide URLs. For example:https://learn.scientific-python.org/development/guides/mypy/https://learn.scientific-python.org/development/pages/guides/mypy/That broke every existing link into the development guide (and the
mk_url-generated check links pointed at the old paths).This moves the page tree back up one level so the URLs match the original, pre-mystmd paths — old links work again, and no redirects are needed.
Changes
git mv docs/pages/{guides,tutorials,principles,patterns,index.md}→docs/(tracked as renames)pages/from the toc indocs/myst.ymland from internal cross-reference links in the markdown{include}directives for_partials/pyproject.md(../../→../, one less directory level)docs/pages/path references innoxfile.pyand.pre-commit-config.yamldocs/README.mddescribing where pages liveTrade-off
The
/development/pages/…URLs that have been live since the mystmd conversion will now 404. This restores the long-lived, widely-shared original URLs instead, which is the priority. If we'd rather keep both working, we could add a build-time redirect step instead — happy to do that on request.Verification
bun run build— no errors or unresolved-link warnings; output URLs are back toguides/style/,guides/mypy/, etc. with nopages/segmentprek -aall greenpytest— 245 passed, 1 skipped📚 Documentation preview 📚: https://scientific-python-cookie--814.org.readthedocs.build/